/*
 * @(#)ServiceActionResult.java
 * Date 2013-08-30
 * Version 1.0
 * Author Jim Horner
 * Copyright (c)2012
 */


package us.hornerscorners.lamppost.model;

import java.util.ArrayList;
import java.util.List;

import us.hornerscorners.lamppost.exception.ServiceActionException;

import us.hornerscorners.lamppost.model.common.AbstractPersistableModel;


/**
 * Class description
 *
 *
 * @version        v1.0, 2013-08-30
 * @author         Jim Horner
 */
public class ServiceActionResult {

    /** Field description */
    private final List<ServiceActionException> exceptions;

    /** Field description */
    private final List<AbstractPersistableModel> failures;

    /** Field description */
    private boolean success;

    /** Field description */
    private final List<AbstractPersistableModel> successes;

    /**
     * Constructs ...
     *
     */
    public ServiceActionResult() {

        super();

        this.exceptions = new ArrayList<>();
        this.failures = new ArrayList<>();
        this.successes = new ArrayList<>();
    }

    /**
     * Method description
     *
     *
     * @return
     */
    public List<ServiceActionException> getExceptions() {
        return exceptions;
    }

    /**
     * Method description
     *
     *
     * @return
     */
    public List<AbstractPersistableModel> getFailures() {
        return failures;
    }

    /**
     * Method description
     *
     *
     * @return
     */
    public List<AbstractPersistableModel> getSuccesses() {
        return successes;
    }

    /**
     * Method description
     *
     *
     * @return
     */
    public boolean isSuccess() {
        return success;
    }

    /**
     * Method description
     *
     *
     * @param success
     */
    public void setSuccess(boolean success) {
        this.success = success;
    }
}
